package com.hdl.service.impl;

import java.util.List;

import com.hdl.dao.MallProductDao;
import com.hdl.dao.impl.MallProductDaolmpl;
import com.hdl.entity.MallProduct;
import com.hdl.service.MallProductService;

public class MallProductServiceImpl implements MallProductService {
    
	private MallProductDao dao= new MallProductDaolmpl();
	@Override
	public List<MallProduct> SelectAllProductByTypeId(int typeid) {
		return dao.SelectAllProductByTypeId(typeid);
	}

	@Override
	public MallProduct SelectProductById(String id) {
		return dao.SelectProductById(id);
	}

	@Override
	public List<MallProduct> SelectProduct(int index, int pagemax, int typeid, String lk) {
		return dao.SelectProduct(index, pagemax, typeid, lk);
	}

	@Override
	public int Total(int typeid, String lk) {
		return dao.Total(typeid, lk);
	}

	@Override
	public void AddProduct(MallProduct mp) {
		dao.AddProduct(mp);
		
	}

	@Override
	public void DeleltProductById(String id) {
		dao.DeleltProductById(id);
		
	}

	@Override
	public void UpdateProduct(String id, MallProduct mp) {
		 dao.UpdateProduct(id, mp);
		
	}

}
